export const calender = (day = 1) => {
	const today = new Date();
	const tomorrow = new Date(today); // 复制当前日期对象
	tomorrow.setDate(tomorrow.getDate() + day); // 设置为明天
	//星期
	const weekdaysCN = ['周日', '星期一', '星期二', '星期三', '星期四', '星期五', '星期六'];
	//明天
	const tomorrowWeek = tomorrow.getDay()
	//今天
	const toDayWeek = today.getDay()

	let tomorroday = tomorrow.getDate() >= 10 ? tomorrow.getDate() : `0${tomorrow.getDate()}`
	let tomorromonth = (tomorrow.getMonth() + 1) >= 10 ? (tomorrow.getMonth() + 1) : `0${(tomorrow.getMonth() + 1)}`

	let nowday = today.getDate() >= 10 ? today.getDate() : `0${today.getDate()}`
	let nowmonth = (today.getMonth() + 1) >= 10 ? (today.getMonth() + 1) : `0${(today.getMonth() + 1)}`
	let mt = {
		year: tomorrow.getFullYear(),
		month: tomorromonth,
		day: tomorroday,
		weekText: weekdaysCN[tomorrowWeek],
		date: `${tomorrow.getFullYear()}-${tomorromonth}-${tomorroday}`
	};
	let t = {
		year: today.getFullYear(),
		month: nowmonth,
		day: nowday,
		weekText: weekdaysCN[toDayWeek],
		date: `${today.getFullYear()}-${nowmonth}-${nowday}`
	}
	return {
		now: t,
		tomorrow: mt
	}
}